//
//  BIDSavedInTheDataBase.h
//  随手记01
//
//  Created by 邵瑞 on 13-5-1.
//  Copyright (c) 2013年 邵瑞. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDatabase.h"
#import "BIDABill.h"//封装类用来转接数据的
#import "BIDATypes.h"
@interface BIDDatabaseManager : NSObject
{
    BOOL isReadDatabase;
    
}
@property (strong,nonatomic) FMDatabase *fmdbDataBase;
+(BIDDatabaseManager *)SharedOperator;//单列
-(NSString *)readDb:(NSString *)name;
//dbPathFile参数接受的是#define kFileNameKey @"FMDBBaseA1.db"//的数据库名
//-(BOOL) insertAPayoutOrTypeOrSubtype:(BIDABill *)aPayout OrType:(NSString *)type orSubtype:(NSString*)subtype;//向数据库插入一笔数据
//-(NSMutableDictionary *)putDatabaseInfoInDictOfKeyMonth;
//-(NSMutableDictionary*)putDatabaseInfoInDictOfType;
//
//-(BOOL)updataThePayout:(BIDABill*)payout_id;
//-(BOOL)deleteAPayout:(BIDABill*)payout_id;
//-(NSMutableArray *)readDatabaseHadTheType;
////pie picture
//-(NSMutableArray*)readAMonthData:(int) nomth;
//-(NSMutableArray *)readDatabaseHadTheTypeInMonth:(int)month;
//-(int)readDatabaseAcountOfAType:(NSString*)aType inMonth:(int)month;
//-(NSMutableArray *)getInfoOfType:(NSString*)type inMonth:(int)month;
////type and subtype save to the database
//-(BOOL)readPlistInfoToDatabase;
//-(int)typeCountInDatabase;
//-(NSMutableArray *)DatabaseHadTypes;
//-(NSMutableDictionary*)readDatabasePutIntoDict;
//-(NSMutableArray*)readATypeContentsSubType:(NSString*)type;
//-(NSMutableArray *)readDatabaseInfoBecomeATypes;
////midify type and subtype
//-(BOOL) updataTheTypeOrSubType:(NSString *)type orSubtype:(NSString*)subtype inBeforeAType:(BIDATypes*)aType;
//-(BOOL)addAtypeOrSubType:(NSString *)type OrSubType:(NSString *)subType;




@end
